package org.dromara.bykt.mapper;

import org.dromara.bykt.domain.BYKTSysUser;
import org.dromara.bykt.domain.vo.BYKTSysUserVo;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

/**
 * 用户信息Mapper接口
 *
 * @author Hou
 * @date 2025-07-01
 */
public interface BYKTSysUserMapper extends BaseMapperPlus<BYKTSysUser, BYKTSysUserVo> {

    /**
     * 根据用户ID统计用户数量
     *
     * @param userId 用户ID
     * @return 用户数量
     */
    @DataPermission({
        @DataColumn(key = "deptName", value = "dept_id"),
        @DataColumn(key = "userName", value = "user_id")
    })
    long countUserById(Long userId);
}
